/*
 *  Copyright 2011 derek.
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package com.aocore.d2data;

/**
 *
 * @author derek
 */
public enum StatType
{
    None(-1),
    Strength(0),
    Energy(1),
    Dexterity(2),
    Vitality(3),
    StatPoints(4),
    SkillPoints(5),
    Life(6),
    MaxLife(7),
    Mana(8),
    MaxMana(9),
    Stamina(10),
    MaxStamina(11),
    Level(12),
    Experience(13),
    Gold(14),
    GoldBank(15),
    DefensePercent(16),
    MaxDamagePercent(17),
    MinDamagePercent(18),
    ToHit(19),
    ToBlock(20),
    MinDamage(21),
    MaxDamage(22),
    SecondaryMinDamage(23),
    SecondaryMaxDamage(24),
    DamagePercent(25),
    ManaRecovery(26),
    ManaRecoveryBonus(27),
    StaminaRecoveryBonus(28),
    LastExperience(29),
    NextExperience(30),
    ArmorClass(31),
    ArmorClassVsMissile(32),
    ArmorClassVsMelee(33),
    DamageReduction(34),
    MagicDamageReduction(35),
    DamageResist(36),
    MagicResist(37),
    MaxMagicResist(38),
    FireResist(39),
    MaxFireResist(40),
    LightResist(41),
    MaxLightResist(42),
    ColdResist(43),
    MaxColdResist(44),
    PoisonResist(45),
    MaxPoisonResist(46),
    DamageAura(47),
    FireMinDamage(48),
    FireMaxDamage(49),
    LightMinDamage(50),
    LightMaxDamage(51),
    MagicMinDamage(52),
    MagicMaxDamage(53),
    ColdMinDamage(54),
    ColdMaxDamage(55),
    ColdLength(56),
    PoisonMinDamage(57),
    PoisonMaxDamage(58),
    PoisonLength(59),
    LifeDrainMinDamage(60),
    LifeDrainMaxDamage(61),
    ManaDrainMinDamage(62),
    ManaDrainMaxDamage(63),
    StamDrainMinDamage(64),
    StamDrainMaxDamage(65),
    StunLength(66),
    VelocityPercent(67),
    AttackRate(68),
    OtherAnimRate(69),
    Quantity(70),
    Value(71),
    Durability(72),
    MaxDurability(73),
    LifeRegen(74),
    MaxDurabilityPercent(75),
    MaxLifePercent(76),
    MaxManaPercent(77),
    AttackerTakesDamage(78),
    GoldFind(79),
    MagicFind(80),
    Knockback(81),
    TimeDuration(82),
    ClassSkillsBonus(83),
    UnsentParam1(84),
    AddExperience(85),
    HealAfterKill(86),
    ReducedPrices(87),
    DoubleHerbDuration(88),
    LightRadius(89),
    LightColor(90),
    LowerRequirementsPercent(91),
    LowerLevelRequirement(92),
    FasterAttackRate(93),
    LowerLevelRequirementPercent(94),
    LastBlockFrame(95),
    FasterMoveVelocity(96),
    NonClassSkill(97),
    State(98),
    FasterHitRecovery(99),
    MonsterPlayerCount(100),
    SkillPoisonOverrideLength(101),
    FasterBlockRate(102),
    SkillBypassUndead(103),
    SkillBypassDemons(104),
    FasterCastRate(105),
    SkillBypassBeasts(106),
    SingleSkill(107),
    RestInPeace(108),
    CurseResistance(109),
    PoisonLengthReduction(110),
    NormalDamage(111),
    Howl(112),
    HitBlindsTarget(113),
    DamageToMana(114),
    IgnoreTargetDefense(115),
    FractionalTargetAC(116),
    PreventHeal(117),
    HalfFreezeDuration(118),
    ToHitPercent(119),
    DamageTargetAC(120),
    DemonDamagePercent(121),
    UndeadDamagepercent(122),
    DemonToHit(123),
    UndeadToHit(124),
    Throwable(125),
    ElementalSkillBonus(126),
    AllSkillsBonus(127),
    AttackerTakesLightingDamage(128),
    IronMaidenLevel(129),
    LifeTapLevel(130),
    ThornsPercent(131),
    BoneArmor(132),
    BoneArmorMax(133),
    Freeze(134),
    OpenWounds(135),
    CrushingBlow(136),
    KickDamage(137),
    ManaAfterKill(138),
    HealAfterDemonKill(139),
    ExtraBlood(140),
    DeadlyStrike(141),
    AbsorbFirePercent(142),
    AbsorbFire(143),
    AbsorbLightingPercent(144),
    AbsorbLight(145),
    AbsorbMagicPercent(146),
    AbsorbMagic(147),
    AbsorbColdPercent(148),
    AbsorbCold(149),
    Slow(150),
    Aura(151),
    Indesctructible(152),
    CannotBeFrozen(153),
    StaminaDrainPercent(154),
    Reanimate(155),
    Pierce(156),
    MagicArrow(157),
    ExplosiveArrow(158),
    ThrowMinDamage(159),
    ThrowMaxDamage(160),
    SkillHandOfAthena(161),
    SkillStaminaPercent(162),
    SkillPassiveStaminaPercent(163),
    SkillConcentration(164),
    SkillEnchant(165),
    SkillPierce(166),
    SkillConviction(167),
    SkillChillingArmor(168),
    SkillFrenzy(169),
    SkillDecrepify(170),
    SkillArmorPercent(171),
    Alignment(172),
    Target0(173),
    Target1(174),
    GoldLost(175),
    ConversionLevel(176),
    ConversionMaxHP(177),
    UnitDoOverlay(178),
    AttackVsMonsterType(179),
    DamageVsMonsterType(180),
    Fade(181),
    ArmorOverridePercent(182),
    Unused183(183),
    Unused184(184),
    Unused185(185),
    Unused186(186),
    Unused187(187),
    SkillTabBonus(188),
    Unused189(189),
    Unused190(190),
    Unused191(191),
    Unused192(192),
    Unused193(193),
    Sockets(194),
    SkillOnAttack(195),
    SkillOnKill(196),
    SkillOnDeath(197),
    SkillOnStriking(198),
    SkillOnLevelUp(199),
    Unused200(200),
    SkillOnGetHit(201),
    Unused202(202),
    Unused203(203),
    ChargedSkill(204),
    Unused204(205),
    Unused205(206),
    Unused206(207),
    Unused207(208),
    Unused208(209),
    Unused209(210),
    Unused210(211),
    Unused211(212),
    Unused212(213),
    ArmorPerLevel(214),
    ArmorPercentPerLevel(215),
    LifePerLevel(216),
    ManaPerLevel(217),
    MaxDamagePerLevel(218),
    MaxDamagePercentPerLevel(219),
    StrengthPerLevel(220),
    DexterityPerLevel(221),
    EnergyPerLevel(222),
    VitalityPerLevel(223),
    ToHitPerLevel(224),
    ToHitPercentPerLevel(225),
    ColdDamageMaxPerLevel(226),
    FireDamageMaxPerLevel(227),
    LightningDamageMaxPerLevel(228),
    PoisonDamageMaxPerLevel(229),
    ResistColdPerLevel(230),
    ResistFirePerLevel(231),
    ResistLightningPerLevel(232),
    ResistPoisonPerLevel(233),
    AbsorbColdPerLevel(234),
    AbsorbFirePerLevel(235),
    AbsorbLightningPerLevel(236),
    AbsorbPoisonPerLevel(237),
    ThornsPerLevel(238),
    GoldFindPerLevel(239),
    MagicFindPerLevel(240),
    RegenStaminaPerLevel(241),
    StaminaPerLevel(242),
    DamageDemonPerLevel(243),
    DamageUndeadPerLevel(244),
    ToHitDemonPerLevel(245),
    ToHitUndeadPerLevel(246),
    CrushingBlowPerLevel(247),
    OpenWoundsPerLevel(248),
    KickDamagePerLevel(249),
    DeadlyStrikePerLevel(250),
    FindGemsPerLevel(251),
    ReplenishDurability(252),
    ReplenishQuantity(253),
    ExtraStack(254),
    FindItem(255),
    SlashDamage(256),
    SlashDamagePercent(257),
    CrushDamage(258),
    CrushDamagePercent(259),
    ThrustDamage(260),
    ThrustDamagePercent(261),
    AbsorbSlash(262),
    AbsorbCrush(263),
    AbsorbThrust(264),
    AbsorbSlashPercent(265),
    AbsorbCrushPercent(266),
    AbsorbThrustPercent(267),
    ArmorByTime(268),
    ArmorPercentByTime(269),
    LifeByTime(270),
    ManaByTime(271),
    MaxDamageByTime(272),
    MaxDamagePercentByTime(273),
    StrengthByTime(274),
    DexterityByTime(275),
    EnergyByTime(276),
    VitalityByTime(277),
    ToHitByTime(278),
    ToHitPercentByTime(279),
    ColdMaxDamageByTime(280),
    FireMaxDamageByTime(281),
    LightningMaxDamageByTime(282),
    PoisonMaxDamageByTime(283),
    ResistColdByTime(284),
    ResistFireByTime(285),
    ResistLightningByTime(286),
    ResistPoisonByTime(287),
    AbsorbColdByTime(288),
    AbsorbFireByTime(289),
    AbsorbLightningByTime(290),
    AbsorbPoisonByTime(291),
    FindGoldByTime(292),
    FindMagicByTime(293),
    RegenStaminaByTime(294),
    StaminaByTime(295),
    DamageDemonByTime(296),
    DamageUndeadByTime(297),
    ToHitDemonByTime(298),
    ToHitUndeadByTime(299),
    CrushingBlowByTime(300),
    OpenWoundsByTime(301),
    KickDamageByTime(302),
    DeadlyStrikeByTime(303),
    FindGemsByTime(304),
    PierceCold(305),
    PierceFire(306),
    PierceLightning(307),
    PiercePoison(308),
    DamageVsMonster(309),
    DamagePercentVsMonster(310),
    ToHitVsMonster(311),
    ToHitPercentVsMonster(312),
    DefenseVsMonster(313),
    DefensePercentVsMonster(314),
    FireLength(315),
    BurningMin(316),
    BurningMax(317),
    ProgressiveDamage(318),
    ProgressiveSteal(319),
    ProgressiveOther(320),
    ProgressiveFire(321),
    ProgressiveCold(322),
    ProgressiveLightning(323),
    ExtraCharges(324),
    ProgressiveToHit(325),
    PoisonCount(326),
    DamageFramerate(327),
    PierceIdx(328),
    PassiveFireMastery(329),
    PassiveLightningMastery(330),
    PassiveColdMastery(331),
    PassivePoisonMastery(332),
    PassiveFirePierce(333),
    PassiveLightningPierce(334),
    PassiveColdPierce(335),
    PassivePoisonPierce(336),
    PassiveCriticalStrike(337),
    PassiveDodge(338),
    PassiveAvoid(339),
    PassiveEvade(340),
    PassiveWarmth(341),
    PassiveMasteryMeleeToHit(342),
    PassiveMasteryMeleeDamage(343),
    PassiveMasteryMeleeCritical(344),
    PassiveMasteryThrowToHit(345),
    PassiveMasteryThrowDamage(346),
    PassiveMasteryThrowCritical(347),
    PassiveWeaponBlock(348),
    PassiveSummon_resist(349),
    ModifierListSkill(350),
    ModifierListLevel(351),
    LastSentLifePercent(352),
    SourceUnitType(353),
    SourceUnitID(354),
    ShortParam1(355),
    QuestItemDifficulty(356),
    PassiveMagicMastery(357),
    PassiveMagicPierce(358),
    Invalid(359);

    private final int id;

    private StatType(int id)
    {
        this.id = id;
    }

    public int getId()
    {
        return id;
    }

    public static StatType valueOf(int id) throws IllegalArgumentException
    {
        for (StatType statType : values())
        {
            if (statType.getId() == id)
            {
                return statType;
            }
        }

        throw new IllegalArgumentException(id + " is not a valid StatType");
    }
}
